package com.yellowpage.bigdata.data;

import javax.persistence.*;
import java.sql.Date;

/**
 * Created by mac on 15/12/11.
 */
@Entity
@Table(name = "nsp_onofflog_ta_imei_month", schema = "", catalog = "omc")
public class NspOnofflogTaImeiMonthEntity {
    private int nspOnofflogTaImeiId;
    private String opt;
    private String channelno;
    private Integer uvImei;
    private String areacode;
    private Integer monthId;
    private Date etlTime;
    private String createUser;
    private String note;

    @Id
    @Column(name = "NSP_ONOFFLOG_TA_IMEI_ID")
    public int getNspOnofflogTaImeiId() {
        return nspOnofflogTaImeiId;
    }

    public void setNspOnofflogTaImeiId(int nspOnofflogTaImeiId) {
        this.nspOnofflogTaImeiId = nspOnofflogTaImeiId;
    }

    @Basic
    @Column(name = "OPT")
    public String getOpt() {
        return opt;
    }

    public void setOpt(String opt) {
        this.opt = opt;
    }

    @Basic
    @Column(name = "CHANNELNO")
    public String getChannelno() {
        return channelno;
    }

    public void setChannelno(String channelno) {
        this.channelno = channelno;
    }

    @Basic
    @Column(name = "UV_IMEI")
    public Integer getUvImei() {
        return uvImei;
    }

    public void setUvImei(Integer uvImei) {
        this.uvImei = uvImei;
    }

    @Basic
    @Column(name = "AREACODE")
    public String getAreacode() {
        return areacode;
    }

    public void setAreacode(String areacode) {
        this.areacode = areacode;
    }

    @Basic
    @Column(name = "MONTH_ID")
    public Integer getMonthId() {
        return monthId;
    }

    public void setMonthId(Integer monthId) {
        this.monthId = monthId;
    }

    @Basic
    @Column(name = "ETL_TIME")
    public Date getEtlTime() {
        return etlTime;
    }

    public void setEtlTime(Date etlTime) {
        this.etlTime = etlTime;
    }

    @Basic
    @Column(name = "CREATE_USER")
    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    @Basic
    @Column(name = "NOTE")
    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        NspOnofflogTaImeiMonthEntity that = (NspOnofflogTaImeiMonthEntity) o;

        if (nspOnofflogTaImeiId != that.nspOnofflogTaImeiId) return false;
        if (opt != null ? !opt.equals(that.opt) : that.opt != null) return false;
        if (channelno != null ? !channelno.equals(that.channelno) : that.channelno != null) return false;
        if (uvImei != null ? !uvImei.equals(that.uvImei) : that.uvImei != null) return false;
        if (areacode != null ? !areacode.equals(that.areacode) : that.areacode != null) return false;
        if (monthId != null ? !monthId.equals(that.monthId) : that.monthId != null) return false;
        if (etlTime != null ? !etlTime.equals(that.etlTime) : that.etlTime != null) return false;
        if (createUser != null ? !createUser.equals(that.createUser) : that.createUser != null) return false;
        if (note != null ? !note.equals(that.note) : that.note != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = nspOnofflogTaImeiId;
        result = 31 * result + (opt != null ? opt.hashCode() : 0);
        result = 31 * result + (channelno != null ? channelno.hashCode() : 0);
        result = 31 * result + (uvImei != null ? uvImei.hashCode() : 0);
        result = 31 * result + (areacode != null ? areacode.hashCode() : 0);
        result = 31 * result + (monthId != null ? monthId.hashCode() : 0);
        result = 31 * result + (etlTime != null ? etlTime.hashCode() : 0);
        result = 31 * result + (createUser != null ? createUser.hashCode() : 0);
        result = 31 * result + (note != null ? note.hashCode() : 0);
        return result;
    }
}
